package com.reader.cms.service.impl.sys;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.reader.cms.entity.sys.SysRegions;
import com.reader.cms.mapper.sys.SysRegionsMapper;
import com.reader.cms.service.sys.ISysRegionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @@description  服务实现类
 * @author        jiahaikun
 * @date          2018-08-06
 */
@Service
@Transactional
public class SysRegionsServiceImpl extends ServiceImpl<SysRegionsMapper, SysRegions> implements ISysRegionsService {


@Autowired
private SysRegionsMapper sysRegionsMapper;

/**
 * @function 多表关联查询
 * @param     currentPage 当前页
 * @param     size 每页显示条数
 * @param     parms 其它参数，自行定义
 * @return
 */
    @Transactional(readOnly=true)
    @Override
    public Page<Map<String, Object>> selectListPage(int currentPage,int size,String parms) {
            Page<Map<String, Object>> page = new Page<>(currentPage, size);// 当前页，总条数 构造 page 对象
            return page.setRecords(sysRegionsMapper.selectListPage(page,parms));
    }

}